	
	** Append waves
		use "$dir/data/MLW_w2_individual.dta", clear
		ren w2_* *
		gen wave="w2"
		tempfile data
		save `data', replace
		
		qui foreach wave in w3 w4 w5 {
			use "$dir/data/MLW_`wave'_individual.dta", clear
			ren `wave'_* *
			gen wave="`wave'"
			append using `data'
			save `data', replace
		}
		
	** Age groups
		replace age=. if age<0
		gen age_group5=floor(age/5)*5
		gen age_group10=floor(age/10)*10
		
		replace age_group5=80 if age_group5>80 & !missing(age_group5)
		replace age_group10=80 if age_group10>80 & !missing(age_group10)
		
	** Any work
		egen work_any=rowmax(work_outsideHH work_agHH work_bizHH)
	
	** Lives alone
		gen lives_alone=(hh_size==1)
		
	** Disability
		gen disability=(																	 	 ///
			diff_seei==1 | 																	 	 ///
			diff_hear==1 | 																	     ///
			diff_walk_clim==1 | 															     ///
			diff_reme==1 | 																	     ///
			diff_self_care==1 |																	 ///
			diff_comm ==1																		 ///
			)
		replace disability=. if (														         ///
			missing(diff_seei) &																 ///
			missing(diff_hear) & 														     	 ///
			missing(diff_walk_clim) & 														 	 ///
			missing(diff_reme) &																 ///
			missing(diff_self_care) &														     ///
			missing(diff_comm)       															 ///
			)
	save "$dir/data/mlw.dta", replace
